from django.db import models

# Create your models here.


# 用户名和账户都不能在数据库内有重复
class CheckUserName(models.Model):
    user = models.CharField(max_length=20, primary_key=True)  # 将账户是唯一的
    name = models.CharField(max_length=20)


class User(models.Model):
    user = models.CharField(max_length=50, primary_key=True)  # 将name设置为主键
    name = models.CharField(max_length=50)  # 用户名
    password = models.CharField(max_length=30)  # 密码
    email = models.CharField(max_length=40)  # 邮箱